<template>
  <div class="evaluate-item">
    <evaluate-info :evaluate="evaluate"/>
    <evaluate-reply :reply="evaluate.sellerReplyInfo"/>
  </div>
</template>

<script>
export default {
  name: 'evaluate-item',
  components: {
    evaluateInfo: () => import('./evaluate-info'),
    evaluateReply: () => import('./evaluate-reply'),
  },
  props: {
    evaluate: Object
  },
  data() {
    return {}
  },
  created() {
    if (!this.evaluate.sellerReplyInfo) {
      this.evaluate.sellerReplyInfo = {
        serialNo: this.evaluate.serialNo,
        content: null
      }
    }
    this.queryEvaluateInfo()
  },
  methods: {
    queryEvaluateInfo() {
      // 查询评价的详细信息
      this.evaluateInfo = {
        evaluate: {
          user: {
            avatar: 'https://edu-guli-fang.oss-cn-shanghai.aliyuncs.com/20220417/5f6f47cca1ae45e2a5f2e83d9d67e91e.jpg',
            name: '树洞'
          },
          createdTime: '2022-04-30 09:11',
          goods: {
            name: '桌子'
          },
          evaluateContent: '物品已经收到了，快递配送的也很快。外包装也很好，打开包装按照说明书，把配件整理一下，用螺丝将支架组装了起来，最后把桌板也固定上了，装完放到地板上，挺稳定的，可以调节平整的螺母很人性化，桌面光泽度很好，也很平整，原木色是我喜欢的类型，挺喜欢的，很实用！',
          imageList: [
            'https://edu-guli-fang.oss-cn-shanghai.aliyuncs.com/20220417/57aedf4e57ee645f.jpg',
            'https://edu-guli-fang.oss-cn-shanghai.aliyuncs.com/20220417/89d8a0b7dba67cd8.jpg',
            'https://edu-guli-fang.oss-cn-shanghai.aliyuncs.com/20220417/92c367b073a90f95.jpg',
            'https://edu-guli-fang.oss-cn-shanghai.aliyuncs.com/20220417/a8c314e79af77261.jpg',
          ]
        },
        reply: {
          replyText: 'dnjasfnjasfnasjfsafasbfhabf'
        }
      }
    }
  }
}
</script>

<style lang="less" scoped>
.evaluate-item{
  margin: 10px 20px;
}
</style>
